package cn.iocoder.yudao.module.reading.controller.app.assignment.vo;

import cn.iocoder.yudao.module.reading.framework.vo.BaseUrlConvertVO;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.EqualsAndHashCode;

/**
 * 可选绘本集信息 Response VO
 *
 * @author 芋道源码
 */
@Schema(description = "用户 APP - 可选绘本集信息 Response VO")
@Data
@EqualsAndHashCode(callSuper = false)
public class BookSetSelectableRespVO extends BaseUrlConvertVO {

    @Schema(description = "绘本集ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "1")
    private Long id;

    @Schema(description = "绘本集标题", requiredMode = Schema.RequiredMode.REQUIRED, example = "小猪佩奇系列")
    private String title;

    @Schema(description = "绘本集描述", example = "经典儿童绘本系列")
    private String description;

    @Schema(description = "绘本集封面", example = "/static/book-sets/peppa_cover.jpg")
    private String cover;

    @Schema(description = "语言类型", requiredMode = Schema.RequiredMode.REQUIRED, example = "english")
    private String language;

    @Schema(description = "绘本数量", requiredMode = Schema.RequiredMode.REQUIRED, example = "20")
    private Integer bookCount;

    @Schema(description = "难度级别", example = "beginner")
    private String difficultyLevel;

    @Schema(description = "适合年龄", example = "3-6岁")
    private String ageRange;

    /**
     * 转换URL字段
     * 将相对路径转换为完整URL
     */
    @Override
    public void convertUrls() {
        this.cover = convertUrl(this.cover);
    }

}
